package com.sum.common.bean;

public class ReaderExt {
    public ReaderExt() {
    }

    public static class ErrInfo {
        public int derrcode;
        public String errstr;

        public ErrInfo() {
        }
    }

    public static class TEMPTAGINFO implements Cloneable {
        public byte AntennaID;
        public int Frequency;
        public int TimeStamp;
        public short EmbededDatalen;
        public byte[] EmbededData;
        public byte[] Res = new byte[2];
        public byte[] PC = new byte[2];
        public byte[] CRC = new byte[2];
        public short Epclen;
        public byte[] EpcId;
        public int Phase;
        public SL_TagProtocol protocol;
        public int ReadCnt;
        public int RSSI;
        public double Temperature;
        public int index;
        public int count;

        public TEMPTAGINFO() {
        }

        public Object clone() {
            TEMPTAGINFO o = null;

            try {
                o = (TEMPTAGINFO)super.clone();
                return o;
            } catch (CloneNotSupportedException var3) {
                return null;
            }
        }
    }

    public static enum SL_TagProtocol {
        SL_TAG_PROTOCOL_NONE(0),
        SL_TAG_PROTOCOL_ISO180006B(3),
        SL_TAG_PROTOCOL_GEN2(5),
        SL_TAG_PROTOCOL_ISO180006B_UCODE(6),
        SL_TAG_PROTOCOL_IPX64(7),
        SL_TAG_PROTOCOL_IPX256(8);

        int p_v;

        private SL_TagProtocol(int v) {
            this.p_v = v;
        }

        public int value() {
            return this.p_v;
        }

        public static SL_TagProtocol valueOf(int value) {
            switch (value) {
                case 0:
                    return SL_TAG_PROTOCOL_NONE;
                case 1:
                case 2:
                case 4:
                default:
                    return null;
                case 3:
                    return SL_TAG_PROTOCOL_ISO180006B;
                case 5:
                    return SL_TAG_PROTOCOL_GEN2;
                case 6:
                    return SL_TAG_PROTOCOL_ISO180006B_UCODE;
                case 7:
                    return SL_TAG_PROTOCOL_IPX64;
                case 8:
                    return SL_TAG_PROTOCOL_IPX256;
            }
        }
    }

    public static enum Region_Conf {
        RG_NONE(0),
        RG_NA(1),
        RG_EU(2),
        RG_EU2(7),
        RG_EU3(8),
        RG_KR(3),
        RG_PRC(6),
        RG_PRC2(10),
        RG_OPEN(255),
        RG_IN(4),
        RG_JP(5),
        RG_CE_HIGH(12),
        RG_HK(13),
        RG_TAIWAN(14),
        RG_MALAYSIA(15),
        RG_SOUTH_AFRICA(16),
        RG_BRAZIL(17),
        RG_THAILAND(18),
        RG_SINGAPORE(19),
        RG_AUSTRALIA(20),
        RG_URUGUAY(22),
        RG_VIETNAM(23),
        RG_ISRAEL(24),
        RG_PHILIPPINES(25),
        RG_INDONESIA(26),
        RG_NEW_ZEALAND(27),
        RG_PERU(28),
        RG_RUSSIA(29),
        RG_CE_LOW_HIGH(30);

        int p_v;

        private Region_Conf(int v) {
            this.p_v = v;
        }

        public int value() {
            return this.p_v;
        }

        public static Region_Conf valueOf(int value) {
            switch (value) {
                case 0:
                    return RG_NONE;
                case 1:
                    return RG_NA;
                case 2:
                    return RG_EU;
                case 3:
                    return RG_KR;
                case 4:
                    return RG_IN;
                case 5:
                    return RG_JP;
                case 6:
                    return RG_PRC;
                case 7:
                    return RG_EU2;
                case 8:
                    return RG_EU3;
                case 10:
                    return RG_PRC2;
                case 12:
                    return RG_CE_HIGH;
                case 13:
                    return RG_HK;
                case 14:
                    return RG_TAIWAN;
                case 15:
                    return RG_MALAYSIA;
                case 16:
                    return RG_SOUTH_AFRICA;
                case 17:
                    return RG_BRAZIL;
                case 18:
                    return RG_THAILAND;
                case 19:
                    return RG_SINGAPORE;
                case 20:
                    return RG_AUSTRALIA;
                case 22:
                    return RG_URUGUAY;
                case 23:
                    return RG_VIETNAM;
                case 24:
                    return RG_ISRAEL;
                case 25:
                    return RG_PHILIPPINES;
                case 26:
                    return RG_INDONESIA;
                case 27:
                    return RG_NEW_ZEALAND;
                case 28:
                    return RG_PERU;
                case 29:
                    return RG_RUSSIA;
                case 30:
                    return RG_CE_LOW_HIGH;
                case 255:
                    return RG_OPEN;
                default:
                    return null;
            }
        }
    }
    public static enum READER_ERR {
        MT_OK_ERR(0),
        MT_IO_ERR(1),
        MT_INTERNAL_DEV_ERR(2),
        MT_CMD_FAILED_ERR(3),
        MT_CMD_NO_TAG_ERR(4),
        MT_M5E_FATAL_ERR(5),
        MT_OP_NOT_SUPPORTED(6),
        MT_INVALID_PARA(7),
        MT_INVALID_READER_HANDLE(8),
        MT_HARDWARE_ALERT_ERR_BY_HIGN_RETURN_LOSS(9),
        MT_HARDWARE_ALERT_ERR_BY_TOO_MANY_RESET(10),
        MT_HARDWARE_ALERT_ERR_BY_NO_ANTENNAS(11),
        MT_HARDWARE_ALERT_ERR_BY_HIGH_TEMPERATURE(12),
        MT_HARDWARE_ALERT_ERR_BY_READER_DOWN(13),
        MT_HARDWARE_ALERT_ERR_BY_UNKNOWN_ERR(14),
        M6E_INIT_FAILED(15),
        MT_OP_EXECING(16),
        MT_UNKNOWN_READER_TYPE(17),
        MT_OP_INVALID(18),
        MT_HARDWARE_ALERT_BY_FAILED_RESET_MODLUE(19),
        MT_MAX_ERR_NUM(20),
        MT_MAX_INT_NUM(21),
        MT_TEST_DEV_FAULT_1(51),
        MT_TEST_DEV_FAULT_2(52),
        MT_TEST_DEV_FAULT_3(53),
        MT_TEST_DEV_FAULT_4(54),
        MT_TEST_DEV_FAULT_5(55),
        MT_UPDFWFROMSP_OPENFILE_FAILED(80),
        MT_UPDFWFROMSP_FILE_FORMAT_ERR(81),
        MT_JNI_INVALID_PARA(101),
        MT_OTHER_ERR(-268435457);

        private int value = 0;

        private String message;

        private READER_ERR(int value) {
            this.value = value;
        }

        public static READER_ERR valueOf(int value) {
            switch (value) {
                case 0:
                    return MT_OK_ERR;
                case 1:
                    return MT_IO_ERR;
                case 2:
                    return MT_INTERNAL_DEV_ERR;
                case 3:
                    return MT_CMD_FAILED_ERR;
                case 4:
                    return MT_CMD_NO_TAG_ERR;
                case 5:
                    return MT_M5E_FATAL_ERR;
                case 6:
                    return MT_OP_NOT_SUPPORTED;
                case 7:
                    return MT_INVALID_PARA;
                case 8:
                    return MT_INVALID_READER_HANDLE;
                case 9:
                    return MT_HARDWARE_ALERT_ERR_BY_HIGN_RETURN_LOSS;
                case 10:
                    return MT_HARDWARE_ALERT_ERR_BY_TOO_MANY_RESET;
                case 11:
                    return MT_HARDWARE_ALERT_ERR_BY_NO_ANTENNAS;
                case 12:
                    return MT_HARDWARE_ALERT_ERR_BY_HIGH_TEMPERATURE;
                case 13:
                    return MT_HARDWARE_ALERT_ERR_BY_READER_DOWN;
                case 14:
                    return MT_HARDWARE_ALERT_ERR_BY_UNKNOWN_ERR;
                case 15:
                    return M6E_INIT_FAILED;
                case 16:
                    return MT_OP_EXECING;
                case 17:
                    return MT_UNKNOWN_READER_TYPE;
                case 18:
                    return MT_OP_INVALID;
                case 19:
                    return MT_HARDWARE_ALERT_BY_FAILED_RESET_MODLUE;
                case 20:
                    return MT_OTHER_ERR;
                case 21:
                    return MT_OTHER_ERR;
                case 22:
                case 23:
                case 24:
                case 25:
                case 26:
                case 27:
                case 28:
                case 29:
                case 30:
                case 31:
                case 32:
                case 33:
                case 34:
                case 35:
                case 36:
                case 37:
                case 38:
                case 39:
                case 40:
                case 41:
                case 42:
                case 43:
                case 44:
                case 45:
                case 46:
                case 47:
                case 48:
                case 49:
                case 50:
                case 56:
                case 57:
                case 58:
                case 59:
                case 60:
                case 61:
                case 62:
                case 63:
                case 64:
                case 65:
                case 66:
                case 67:
                case 68:
                case 69:
                case 70:
                case 71:
                case 72:
                case 73:
                case 74:
                case 75:
                case 76:
                case 77:
                case 78:
                case 79:
                case 82:
                case 83:
                case 84:
                case 85:
                case 86:
                case 87:
                case 88:
                case 89:
                case 90:
                case 91:
                case 92:
                case 93:
                case 94:
                case 95:
                case 96:
                case 97:
                case 98:
                case 99:
                case 100:
                default:
                    return MT_OTHER_ERR;
                case 51:
                    return MT_TEST_DEV_FAULT_1;
                case 52:
                    return MT_TEST_DEV_FAULT_2;
                case 53:
                    return MT_TEST_DEV_FAULT_3;
                case 54:
                    return MT_TEST_DEV_FAULT_4;
                case 55:
                    return MT_TEST_DEV_FAULT_5;
                case 80:
                    return MT_UPDFWFROMSP_OPENFILE_FAILED;
                case 81:
                    return MT_UPDFWFROMSP_FILE_FORMAT_ERR;
                case 101:
                    return MT_JNI_INVALID_PARA;
            }
        }

        public int value() {
            return this.value;
        }

        public String getMessage() {
            return message;
        }

        public void setMessage(String message) {
            this.message = message;
        }
    }

    public static enum Lock_Type {
        KILL_PASSWORD_UNLOCK(0),
        KILL_PASSWORD_LOCK(512),
        KILL_PASSWORD_PERM_LOCK(768),
        ACCESS_PASSWD_UNLOCK(0),
        ACCESS_PASSWD_LOCK(128),
        ACCESS_PASSWD_PERM_LOCK(192),
        ACCESS_PASSWD_PERM_UNLOCK(0),
        BANK1_UNLOCK(0),
        BANK1_LOCK(32),
        BANK1_PERM_LOCK(48),
        BANK2_UNLOCK(0),
        BANK2_LOCK(8),
        BANK2_PERM_LOCK(12),
        BANK3_UNLOCK(0),
        BANK3_LOCK(2),
        BANK3_PERM_LOCK(3);

        int p_v;

        private Lock_Type(int v) {
            this.p_v = v;
        }

        public int value() {
            return this.p_v;
        }
    }

    public static enum Lock_Obj {
        LOCK_OBJECT_KILL_PASSWORD(1),
        LOCK_OBJECT_ACCESS_PASSWD(2),
        LOCK_OBJ_EPC_MEMORY(2),
        LOCK_OBJECT_TID_MEMORY(3),
        LOCK_OBJECT_USER_MEMORY(4),
        LOCK_OBJECT_BANK1(4),
        LOCK_OBJECT_BANK2(8),
        LOCK_OBJECT_BANK3(16);

        int p_v;

        private Lock_Obj(int v) {
            this.p_v = v;
        }

        public int value() {
            return this.p_v;
        }
    }
}